{% extends 'base.html' %}

{% block title %}{{ SITENAME|striptags }} - 所有分类{% endblock %}

{% block content %}
<div class="container-fluid">
  <h2 class="m-lg-4 m-md-3 m-sm-2 text-center">所有分类</h2>
  <div class="row">
      <ul class="list-group col-9 m-auto">
        {% for category, articles in categories|sort %}
        <a href="{{ SITEURL }}/{{ category.url }}" class="text-decoration-none">
          <li class="list-group-item d-flex justify-content-between align-items-center">
            {{ category }}
            <span class="badge text-bg-primary rounded-pill">{{ articles|count }}</span>
          </li>
        </a>
        {% endfor %}
      </ul>
    </div>
</div>
{% endblock %}